package com.java110.dto.data;

import com.alibaba.fastjson.JSONObject;
import com.java110.dto.PageDto;

import java.io.Serializable;

/**
 * @ClassName 自定义databus
 * @Description 业务数据同步数据层封装
 * @Author wuxw
 * @Date 2019/4/24 8:52
 * @Version 1.0
 * add by wuxw 2019/4/24
 **/
public class DatabusDataDto extends PageDto implements Serializable {

    // 订单支付完成下单
    public static final String BUY_ORDER_NOTIFY = "BUY_ORDER_NOTIFY";
    // 备货完成
    public static final String FINISH_READY_ORDER = "FINISH_READY_ORDER";



    private String businessTypeCd;

    private JSONObject data;

    private String businessId;

    public DatabusDataDto() {
    }

    public DatabusDataDto(String businessTypeCd, String businessId) {
        this.businessTypeCd = businessTypeCd;
        this.data = new JSONObject();
        this.data.put("businessId", businessId);
        this.businessId = businessId;
    }


    public DatabusDataDto(String businessTypeCd, String businessId, JSONObject data) {
        this.businessTypeCd = businessTypeCd;
        this.data = data;
        this.businessId = businessId;
    }

    public static DatabusDataDto getInstance(String businessTypeCd, String businessId, JSONObject data) {
        return new DatabusDataDto(businessTypeCd, businessId, data);
    }


    public String getBusinessTypeCd() {
        return businessTypeCd;
    }

    public void setBusinessTypeCd(String businessTypeCd) {
        this.businessTypeCd = businessTypeCd;
    }

    public JSONObject getData() {
        return data;
    }

    public void setData(JSONObject data) {
        this.data = data;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }
}
